import { root } from "../apiRoot";
import { defHttp } from '@/utils/http';
import { AuthDetail, PersonalRealNameAuth, OrganizationRealNameAuth, EnterpriseRealNameAuth } from "./type";


const Api = {
    botCertificationDetail: root + 'bot/certification/detail',
    botCertificationCertify: root + 'bot/certification/certify',
}
/**
 * 获取实名认证详情
 * @returns 
 */
export const botCertificationDetail = () => {
    return defHttp.get<AuthDetail>({
        url: Api.botCertificationDetail,
    });
}

/**
 * 提交实名认证信息
 * @param data 
 * @returns 
 */
export const botCertificationCertify = (data: PersonalRealNameAuth | OrganizationRealNameAuth | EnterpriseRealNameAuth) => {
    return defHttp.post({
        url: Api.botCertificationCertify,
        data,
    });
}
